from django.urls import path, re_path
from .users_view import (
    UserInfoView, UserPageView, UserView, UserFormView, 
    UserDetailView, UserTemplateView, UserPasswordView, UserStatusView,
    UserProfileView, UserPasswordChangeView, UserEmailCodeView, UserEmailUpdateView,
    UserImportView, UserExportView, UserOptionsView, UserMobileCodeView, UserMobileUpdateView
)

urlpatterns = [
    path('/me', UserInfoView.as_view(), name='user_info'),
    path('/page', UserPageView.as_view(), name='user_page'),
    path('/template', UserTemplateView.as_view(), name='user_template'),
    path('', UserView.as_view(), name='user_create'),
    path('/<int:user_id>/form', UserFormView.as_view(), name='user_form'),
    path('/<int:user_id>/password/reset', UserPasswordView.as_view(), name='user_password_reset'),
    path('/<int:user_id>/status', UserStatusView.as_view(), name='user_status_update'),
    path('/profile', UserProfileView.as_view(), name='user_profile'),
    path('/password', UserPasswordChangeView.as_view(), name='user_password_change'),
    path('/email/code', UserEmailCodeView.as_view(), name='user_email_code'),
    path('/email', UserEmailUpdateView.as_view(), name='user_email_update'),
    path('/mobile/code', UserMobileCodeView.as_view(), name='user_mobile_code'),
    path('/mobile', UserMobileUpdateView.as_view(), name='user_mobile_update'),
    path('/import', UserImportView.as_view(), name='user_import'),
    path('/export', UserExportView.as_view(), name='user_export'),
    path('/options', UserOptionsView.as_view(), name='user_options'),
    re_path(r'^/(?P<ids>\d+(?:,\d+)*)$', UserDetailView.as_view(), name='user_operations'),
]
